<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="backText" @click="cancel">返回</block>
			<block slot="content" class="text-bold"> 免责声明 </block>
		</cu-custom>
		<view class="text-center content margin-top">《隐私权政策》</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<view> adadada</view>
		<button v-if="time>0" :disabled="time>0" class=" bg-gradual-orange margin-top-xl cu-btn margin text-xxl"
			style="width: 90%; height: 80upx;font-family: 楷体;">剩余{{time}}S</button>
		<button @click="agree" v-else :disabled="time>0" class=" bg-gradual-blue margin-top-xl cu-btn margin text-xxl"
			style="width: 90%; height: 80upx;font-family: 楷体;">同意声明</button>
		<!-- <button @click="agree" v-else :disabled="time>0" class=" bg-gradual-green margin-top-xl cu-btn margin text-xxl"
			style="width: 90%; height: 80upx;font-family: 楷体;">不同意</button> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				completed: true,
				time: 10
			}
		},
		mounted() {
			let id = setInterval(() => {
				if (this.$data.time == 0) {
					clearInterval(id)
				}
				this.$data.time--
			}, 1000)
		},
		methods: {
			agree() {
				uni.$emit("agreement", this.$data.completed)
				uni.navigateBack()
			},
			cancel() {

			}
		}
	}
</script>
<style>
</style>
